package com.yckj.day07;

/**
 * TODO
 *
 * @author shengyuee
 * @version 1.0
 * 2025/7/24 15:51
 */
public class GoldDog extends Dog2{
//    final String name = "汪汪";// final修饰的属性，可以声明的同时就赋值初始化属性
    final String name;
    String sex;
    // static final 修饰的属性可以声明时同时赋值，也可以先声明，然后在静态代码块赋值
    static final int num ;
    static{
        num = 3;
    }

    public GoldDog() {
        name = "小黄";
    }

    public GoldDog(String name) {
        this.name = name;
    }

    static{

    }
    @Override
    public void shout(){
        System.out.println("金毛在叫");
    }
//    public  void eat(){
//
//    }
}
